package com.kexinde.wjifen.model;

import javax.persistence.Entity;

/**
 * 用户商店积分
 * 
 * @author WEI
 *
 */
@Entity
public class ShopPoint {

	/**
	 * 主键
	 */
	private Long id;
	
	/**
	 * 积分
	 */
	private Long point = 0L;
	
	/**
	 * 经验值
	 */
	private Long expValue = 0L;
	
	/**
	 * 是否是VIP
	 */
	private Integer isVip = 0;
	
	/**
	 * 用户id（外键）
	 */
	private Long userId = 0L;
	
	/**
	 * 商店id（外键）
	 */
	private Long shopId = 0L;

	/**
	 * 构造方法
	 * 动态创建实例，用于数据库读写时，反射获取对象
	 * 
	 * @param id
	 * @param point
	 * @param expValue
	 * @param isVip
	 * @param userId
	 * @param shopId
	 */
	public ShopPoint(Long id, Long point, Long expValue, Integer isVip,
			Long userId, Long shopId) {
		super();
		this.id = id;
		this.point = point;
		this.expValue = expValue;
		this.isVip = isVip;
		this.userId = userId;
		this.shopId = shopId;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getPoint() {
		return point;
	}

	public void setPoint(Long point) {
		this.point = point;
	}

	public Long getExpValue() {
		return expValue;
	}

	public void setExpValue(Long expValue) {
		this.expValue = expValue;
	}

	public Integer getIsVip() {
		return isVip;
	}

	public void setIsVip(Integer isVip) {
		this.isVip = isVip;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getShopId() {
		return shopId;
	}

	public void setShopId(Long shopId) {
		this.shopId = shopId;
	}

	/**
	 * 用于测试
	 */
	@Override
	public String toString() {
		return "ShopPoint [id=" + id + ", point=" + point + ", expValue="
				+ expValue + ", isVip=" + isVip + ", userId=" + userId
				+ ", shopId=" + shopId + "]";
	}
	
}
